import { i18n } from "@/i18n";
import { getProductAttributes } from "@/utils/appCommon/appCommonOptions/deviceParam";

export function getAggregateParams(productKey:string, need_time:boolean) {
  const i18nObj = i18n.global
  const list = getProductAttributes(productKey)
  let res = []
  if(need_time){
    res.push({
      val: "sampletime",
      label: i18nObj.t("device.sampletime"),
      unit: "",
    })
  }
  list.map((item:any) => {
    res.push({
      // @ts-ignore
      val: item.val,
      // @ts-ignore
      label: item.label,
      unit: item.unit,
    })
  })
  return res
}
